<template>
  <a-spin :spinning="confirmLoading">
             <a-form-model ref="form" :model="models" :rules="validatorRules">
               <a-form-model-item
                 :labelCol="labelCol"
                 :wrapperCol="wrapperCol"
                 prop="content"
                 required
                 label="工作内容"
               >
                 <a-textarea :rows="5" v-model="models.content" placeholder="请填写您的工作内容" />
               </a-form-model-item>
               <a-form-model-item
                  :labelCol="labelCol"
                  :wrapperCol="wrapperCol"
                  prop="position"
                  required
                  label="职位"
                >
                  <a-input placeholder="填写您的职位" v-model="models.position" />
                </a-form-model-item>
               <a-form-model-item
                 :labelCol="labelCol"
                 :wrapperCol="wrapperCol"
                 prop="reportType"
                 required
                 label="报告类型"
               >
                 <j-dict-select-tag
                   placeholder="选择报告类型"
                   dictCode="daily_weekly"
                   v-model="models.reportType"
                 />
               </a-form-model-item>

             </a-form-model>
           </a-spin>
</template>

<script>
// import IndexChart from './IndexChart'
// import IndexTask from "./IndexTask"
// import IndexBdc from './IndexBdc'
import { mapGetters } from 'vuex'
import { sessionNoteList } from '@/api/api'
import { deleteAction } from '@/api/manage'
export default {
 name: 'DailyWeekly',
 components: {
   // IndexChart,
   // IndexTask,
   // IndexBdc
 },
 props: {
     model: {
       type: Object,
       default: {}
     },
   },
 data() {
   return {

    models: this.model,
      confirmLoading: false,
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 12 },
      },
    validatorRules: {
       content: [{ required: true, message: '请输入工作内容' }],
       position: [{ required: true, message: '请输入职位' }],
       reportType: [{ required: true, message: '请选择报告类型' }],
     },

   }
 },
  created() {},
  computed: {},

  mounted() {
  },
  methods: {
    generatedBtnProp() {
      let obj = {
        content:this.models.content,
        position:this.models.position,
        reportType:this.models.reportType,
      }
      this.$refs.form.validate((valid) => {
        if (valid) {
          this.$emit('appApiAsk', 1,obj)
        } else {
          this.$emit('appApiAsk', 2,obj)
        }
      })
    },

  },
}
</script>

<style lang="less">

</style>